Defining a data source
To use data from an external data source in your Kanzi application:
- Define your data source in a Kanzi Engine plugin. You can use Kanzi to create a data source for any data format. See Defining a data source.
- Use in your Kanzi Studio project the data source plugin which defines your data source. See Taking a data source plugin into use.
To learn how to use a data source in your Kanzi Studio project, see Using a data source.
Defining a data source
You can use Kanzi to create a data source for any data format.
To define a data source:
- In Kanzi Studio create a new project and in the New Project window set the Template to the Application with data source plugin template.
Kanzi creates a Kanzi Studio project in <KanziWorkspace>/Projects/<ProjectName>/Tool_project directory and the structure for the Visual Studio solution for your project in <KanziWorkspace>/Projects/<ProjectName>/Application:
- bin directory contains the binaries and configuration files of your project.
- configs directory contains the configuration files for different platforms. By default Kanzi creates configuration files for several different platforms. The recommended platform for developing Kanzi applications is Microsoft Visual Studio. See Deploying Kanzi applications.
- src contains the source code for your project.
- In Visual Studio open the solution stored in <ProjectName>/Application/configs/platforms/win32. The solution contains two projects:
- <ProjectName> project. Define your data source in this project. If you build this empty template project, you create a data source which you can use to create a data source in your Kanzi Studio project, however such data source does not have any functionality. If you created the project only to define your data source, you need to use only this project in the Visual Studio solution.
- <ProjectName>_executable project. Define the logic of your Kanzi application in this project.
- Define your data source. Make sure you also define how you want to reload the data in your data source.
For an example of how to define a data source, see Tutorial: Get application data from a data source.
- Select one of the DLL solution configurations for your version of Visual Studio.
During the development select one of the debug DLL configurations. When you are ready to create the version for production, select one of the release DLL configurations.
For example, select the GL_vs2015_Release_DLL configuration.
- In Visual Studio right-click the project where you defined your data source and select Build.
Visual Studio builds your plugin into a .dll and saves it in <ProjectName>/Application/lib/<PlatformName>/<ConfigurationName> directory.
If the Kanzi Studio project which uses this plugin is opened, before you start building the plugin .dll in Visual Studio, in Kanzi Studio select > Exit Preview.
Taking a data source plugin into use
Once you have your data source plugin ready, you have to either enable it in your Kanzi Studio project, or import the plugin into another Kanzi Studio project where you want to use the same type of the data source.
To define a data source, see Defining a data source.
To take the data source plugin into use in your Kanzi Studio project:
See also
Using a data source
Tutorial: Get application data from a data source
Open topic with navigation